﻿@model GridView<JCTimes.DomainModel.Views.V_PDAUsersFunctions>

@{
    int seq = (Model.PagedList.PageIndex - 1) * Model.PagedList.PageSize;
    var roleid = SessionHelper.CurrUser.RoleID;
}
<table class="table">
    <tr>
        <th style="width: 5%">
            序号
        </th>
        <th style="width: 20%">
            客户名称
        </th>
        <th style="width: 10%">
            功能编号
        </th>
        <th style="width: 10%">
            功能名称
        </th>
            <th style="width: 10%">
                操作
            </th>     
    </tr>
    @foreach (var item in Model.PagedList)
    {
        <tr>
            <td style="text-align: center">
                @((++seq).ToString())
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PDAFunctionNo)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PDAFunctionName)
            </td>
                <td>
               
                    @Html.ImageLink(
                        "编辑",
                     Url.Action("Edit", new { id = item.ID, pageIndex = Model.PagedList.PageIndex, searcher = Model.Searcher }),
                        Url.Content("~/Images/icon-edit.gif")
                    )
                    
                </td>
        </tr>
    }
</table>
<div>
    @if (Model.PagedList.PageCount > 1)
    {
        <div class="pager">
            <p>
                共有<span class="orange">@Model.PagedList.TotalCount</span> 条记录 共<span class="orange">@Model.PagedList.PageCount</span>页
            </p>
            @Ajax.PageLinks(Model.PagedList.PageCount, Model.PagedList.PageIndex, i => Url.Action("Grid", new { pageIndex = i, searcher = Model.Searcher }),
                     new AjaxOptions { UpdateTargetId = "gridview", HttpMethod = "Post" })
        </div>  
    }
</div>
